package com.kingdee.eas.custom.wg.basedata.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectCollection;



public abstract class AbstractPatternUseFacadeControllerBean extends AbstractBizControllerBean implements PatternUseFacadeController
{
    protected AbstractPatternUseFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("4EA87F0B");
    }

    public void deletePattern(Context ctx, IObjectPK pk) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("50c96970-0214-4c7a-ba90-263b72c3e4ce"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _deletePattern(ctx, pk);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _deletePattern(Context ctx, IObjectPK pk) throws BOSException;

    public void syncPattern(Context ctx, IObjectPK pk) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d09f37dd-c929-4fad-915b-ebe4481a7e8c"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _syncPattern(ctx, pk);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _syncPattern(Context ctx, IObjectPK pk) throws BOSException;

    public void deletePatternSet(Context ctx, IObjectPK pk) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9a68f091-a860-4c61-85b4-c9a4317ffd56"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _deletePatternSet(ctx, pk);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _deletePatternSet(Context ctx, IObjectPK pk) throws BOSException;

    public void synPatternSet(Context ctx, IObjectPK pk) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("02dd3219-7335-4a05-9e06-13ae2d2fc11d"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _synPatternSet(ctx, pk);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _synPatternSet(Context ctx, IObjectPK pk) throws BOSException;

    public void copyPattern4CompletionReport(Context ctx, IObjectPK srcBillID, IObjectPK dstBillID) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("f963888f-99bd-4a2d-8eb7-f4f58c006c60"), new Object[]{ctx, srcBillID, dstBillID});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _copyPattern4CompletionReport(ctx, srcBillID, dstBillID);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _copyPattern4CompletionReport(Context ctx, IObjectPK srcBillID, IObjectPK dstBillID) throws BOSException;

    public void checkPattern(Context ctx, IObjectCollection model, String property) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("89339efe-cd7e-45f6-80c8-0d88d83357e6"), new Object[]{ctx, model, property});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _checkPattern(ctx, model, property);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkPattern(Context ctx, IObjectCollection model, String property) throws BOSException, EASBizException;

}